<template>
	<view>
		<navbar title="发布成功"></navbar>
		<view class="main fa fdc">
			<image class="success-icon" src="https://youlinapi.zhihui361.com/image/wx/release-success.png" mode=""></image>
			<view class="prompt">恭喜你成功发布</view>
			<view class="btn1 fa jcc" @click="viewOrder">查看订单</view>
			<view class="btn2 fa jcc" @click="backHome">返回首页</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: ''
			};
		},
		onLoad(options) {
			if(options.id) {
				this.id = options.id
			}
		},
		methods: {
			viewOrder() {
				// 查看取送订单
				uni.setStorageSync('orderTab', 1)
				uni.setStorageSync('confirmOrderId', this.id)
				uni.switchTab({
					url: '/pages/order/order'
				})
			},
			backHome() {
				uni.switchTab({
					url: '/pages/index/index'
				})
			}
		}
	}
</script>
<style>
	page{
		background-color: #fff;
	}
</style>
<style lang="scss" scoped>
	.success-icon{
		margin-top: 228rpx;
		width: 462rpx;
		height: 364rpx;
	}
	.prompt{
		margin-top: 80rpx;
		color: #282828;
	}
	.btn1{
		margin-top: 102rpx;
		width: 544rpx;
		height: 76rpx;
		border: 2rpx solid var(--theme);
		border-radius: 38rpx;
		color: var(--theme);
	}
	.btn2{
		margin-top: 28rpx;
		width: 544rpx;
		height: 76rpx;
		border: 2rpx solid #ccc;
		border-radius: 38rpx;
		color: #777;
	}
</style>
